package com.javasm.entity.sql;

/**
 * @author WangJie
 * @version 1.0
 * @Description:
 * @date: 2020/7/19 15:54
 * @since JDK 1.8
 */
public interface MenuManageSql {

    // 查询首菜单栏信息
    String SELECT_MENU_HEAD = "SELECT sp.pid,sp.pname,sp.fid,sp.isshow,sp.url,sp.glyphicon FROM system_power sp WHERE sp.fid = 0";

    // 根据父id查询子菜单
    String SELECT_MENU_BY_PID = "SELECT sp.pid,sp.pname,sp.fid,sp.isshow,sp.url,sp.glyphicon FROM system_power sp WHERE sp.fid = ?";

//    // 账户信息总条数查询
//    String SELECT_MENU_TOTALCOUNT = "SELECT COUNT(1) FROM system_power";

    // 新增菜单信息
    String INSERT_MENU = "INSERT INTO system_power(pid,pname,fid,isshow,url,glyphicon) VALUES(?,?,?,?,?,?)";

    // 修改菜单信息
    String UPDATE_MENU_BY_PID ="UPDATE system_power sp SET sp.pname=?,sp.fid=?,sp.isshow=?,sp.url=?,sp.glyphicon=? WHERE sp.pid = ?";

    // 删除菜单信息
    String DELERE_MENU_BY_PID ="DELETE FROM system_power WHERE pid = ?";

    // 查询所有菜单信息
    String SELECT_MENU_KEY = "SELECT pid id,pname label FROM system_power WHERE fid = 0";
    String SELECT_MENU_KEY_BY_FID = "SELECT pid id,pname label FROM system_power WHERE fid = ?";
}
